<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html{
            cursor:url("https://cdn.calamus.xyz/cursor/ai2.png"),default !important;
        }
        #box{
            position: absolute;
            transition: all 1s;
            width: 100%;
            height: 100vh;
            background-image: url('imges/1000646.jpg');
            background-size: cover;
            background-repeat: no-repeat;
        }
        #dd{
            position: absolute;
            width: 200px;
            display: flex;
        }
        #dd img{
            width: 50%;
        }
    /*  结束  */







        #TK{
            width: 400px;
            height: 190px;
            background: #0f7cbf;
            margin:230px auto;
            display: none;
        }
        #TK .head{
            display: flex;
            justify-content: space-between;
            cursor: pointer;
            background: #fce2ce;
        }
        #TK .head div:nth-of-type(2):hover{
            color: red;
        }
        #TK > div#text{
            text-align: center;
            line-height: 170px;
            background: #f9f7d9;
        }
    </style>
</head>
<body>
<div id="box">
    <div id="dd">
        <img src="imges/1000646.jpg" alt="">
        <img src="imges/2021812.jpg" alt="">
        <img src="imges/2022617.jpg" alt="">
        <img src="imges/1000009.jpg" alt="">
    </div>


    <div id="TK">
        <div class="head">
            <div>我是广告哦</div>
            <div id="off">X</div>
        </div>

        <div id="text">
            第二根半价哦,考虑一下吗?
        </div>
    </div>
</div>
</body>

<script>
    //色图
    var box = document.getElementById('box')
    var dd = document.getElementById('dd').getElementsByTagName('img')

    for (var i = 0; i<dd.length; i++){
        dd[i].onclick = function () {
            box.style.backgroundImage = 'url('+this.src+')'
        }
    }



    //弹框
    setTimeout(function () {
        var TK = document.getElementById('TK')
        TK.style.display = 'block'
    },4000)

    var off = document.getElementById('off')
    off.onclick = function () {
        TK.style.display = 'none'
    }
</script>

</html>